|
|
|
|
|
|
|
the printer). Notice the ParamArrayargSettings() argument. This argument mechanism allows you to overload the polymorphic call to the printReport method where an arbitrary number of special settings are required by the underlying implementation class. This is especially important for Access and Crystal Reports, both of which have several special settings you can specify. |
|
|
|
|
|
|
|
|
The saveReport method allows you to save the report to a designated location on disk if disk storage is required. |
|
|
|
|
|
|
|
|
Methods for the AccessReporting Class The setQuery method lets you specify the query for the current Access report. argQuery is the argument that contains the actual SQL statement. If desired, you can include some code to verify the syntax of the SQL statement, but it's much easier to simply raise errors whenever the syntax is incorrect. |
|
|
|
|
|
|
|
|
The displayReportList method displays a list of Access reports in the Combo Box referenced by the argument argComboBox. The list of reports is generated by the Reports collection of the Access.Application object. |
|
|
|
|
|
|
|
|
The setReportList method sets a local, private reference to the Combo Box object being passed in. The Combo Box must be set before displaying the report list. |
|
|
|
|
|
|
|
|
Methods for the RichTextReporting Class The setRichTextBox method sets a private reference to the Rich Text Box that is to contain the formatted report information. |
|
|
|
|
|
|
|
|
Methods for the CrystalReporting Class The connectToDataSource method established connection to the source of the data, the database. The connection string represented by argConnString generally looks like |
|
|
|
|
|
|
|
|
DSN=MyDataSourceName;UID=MyUserID;PWD=MyPassword |
|
|
|
|
|
|
|
|
The setQuery method, like the similarly named method for AccessReporting, specifies the SQL statement to be used to populate a given report. |
|
|
|
|
|
|
|
|
Methods for the ReportController Class The clickedOpenReport method handles the implementation of the event associated with opening a report. Generally, when the user clicks a command button that triggers the request to open a report, this method accepts responsibility for the fulfillment of that request. The clickedPrintReport and clickedSaveReport, respectively, handle the request for printing and saving reports in a similar manner. |
|
|
|
|
|
|
|
|
The enableTabStops method disables and enables the tab stops of controls on the form, frmReport. Although this method can be used for any reporting implementation, it's best used with RichTextReporting. |
|
|
|
|
|